<%@ page language="java" contentType="text/html; charset=utf-8"
    import="com.vo.User" pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>登录</title>
</head>
<body>

	<a href="index.jsp"><span>首页</span></a>--
	<a href="AddNewsServlet"><span>发布新闻</span></a>
	<a href="ManageNewsServlet">管理新闻</a>
	
	<%
		User user = (User) session.getAttribute("userinfo");
	   	if (user == null) {
	   		out.print("用户你好，请先登陆！");
	%> 
			<a href="login.jsp"><span>用户登录 </span></a> 
	<%
	 	} else {
	 		out.print(user.getUsername() + "你好，欢迎登陆！");
	%> 
			<a href="logout.jsp"><span>用户注销 </span></a> 
	<%
	 		if (user.getType().equals("1")) {
	%>
				<a href="manager.jsp">用户管理 </a>
				<a href="user.jsp"><span>修改用户信息 </span></a>
	<%
			} else {
	%>
				<a href="user.jsp"><span>修改用户信息 </span></a>
	<%
			}
		}
	%>
	<hr/>
	<br/><br/><br/>
</body>
</html>